package message;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;

import Watcher.ChangeType;

import search.TagedFiles;
/**
 * "file was change" message implemets Message interface
 * @author ran
 *
 */
public class FileWasChanged implements Message,Serializable{
	/**
	 * default serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	String fileName;
	String boxName;
	long checkSum;
	long fileSize;
	Date modDate;
	ArrayList<TagedFiles> allTages;
	ChangeType changeType;
	/**
	 * constructor of the class
	 * @param fileName
	 * @param checkSum
	 * @param fileSize
	 * @param boxName
	 * @param modDate
	 * @param allTages
	 * @param changeType
	 */
	public FileWasChanged(String fileName,long checkSum, long fileSize,String boxName,Date modDate, ArrayList<TagedFiles> allTages,ChangeType changeType) {
		this.fileName=fileName;
		this.checkSum=checkSum;
		this.fileSize = fileSize;
		this.boxName = boxName;
		this.modDate = modDate;
		this.allTages=allTages;
		this.changeType = changeType;
	}
	//getters and setters
	public ChangeType getChangeType() {
		return changeType;
	}

	public Date getModDate() {
		return modDate;
	}

	public String getFileName() {
		return fileName;
	}

	public long getCheckSum() {
		return checkSum;
	}

	public long getFileSize() {
		return fileSize;
	}
	
	public ArrayList<TagedFiles> getAllTages() {
		return allTages;
	}

	public String getBoxName() {
		return boxName;
	}

	@Override
	public MessageType getType() {		
		return MessageType.FILE_WAS_CHANGED;
		
	}
}
